<?php
	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
	 *
	 *	Autocredit
	 *	Copyright (C) 2012, Brent Flap <blog.cyberdevil.nl>
	 *
	 *	Autocredit is free software: you can redistribute it and/or modify
	 *	it under the terms of the GNU General Public License as published by
	 *	the Free Software Foundation, either version 3 of the License, or
	 *	any later version.
	 *
	 *	This program is distributed in the hope that it will be useful,
	 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
	 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 *	GNU General Public License for more details.
	 *
	 *	You should have received a copy of the GNU General Public License
	 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
	 *
	 *	Requirements:   php-cli
	 *	Usage example:  php autocredit.php -p nucash
	 *	Version:        1.0
	 *	Build:          16 (Sept. 13 -2012)
	 *
	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
	 
	require_once('config.php');
	require_once('plugins.php');
	require_once('common.php');
	
	if(substr(php_uname('s'),0,7) == "Windows"){
		define("WIN",true);
	}
	else{
		define("WIN",false);
	}
	if(WIN){ // Wintendows
		system("cls");
	}
	else{
		system("clear"); // Tux
	}
	
	message("CYBERDEViL'S Parser Framework 12092012 Build 15","COMMENT");
	
	$plugin = new Plugins();
	
	$arg = getopt("p:a:b:");
	if(isset($arg['a']) && $arg['a']=="on"){
		$use_proxy = true; // Default false, defined in config.php
		message("Proxy enabled.","COMMENT");
	}
	$plugin::enablePlugin($arg['p']);
	
	$plugin::hook("init");
	$plugin::hook("action");
?>
